<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include::header('安全奖励签发')" />
</head>
<style>
    #febs-incentiveRewardIssuance  .layui-table-view[lay-table-id="incentiveRewardIssuanceTable"] .layui-table-body .layui-table-cell {
        height: 93px;
        line-height: 87px;
    }
</style>
<body class="febs-container" id="febs-incentiveRewardIssuance">
<div class="febs-body layui-fluid"  lay-title="安全奖励签发" >
    <div class="febs-body-search">
        <form class="jhg-body layui-form layui-table-form" lay-filter="incentiveRewardIssuance-table-form" id="incentiveRewardIssuance-table-form">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form-item">
                        <div class="layui-inline" th:classappend="${hasHeadCompanyRole } ? '' : 'febs-hide'">
                            <label class="layui-form-label layui-form-label-sm">公司名称</label>
                            <div class="layui-input-inline"  >
                                <select name="tenantId" id="tenantId" lay-search="" lay-filter="tenantId">
                                    <option th:each="item:${tenantList }"
                                            th:value="${item.tenantId}" th:text="${item.tenantName}"
                                            th:selected="${tenantId ==item.tenantId}">
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline" id="laydate-range">
                            <label class="layui-form-label layui-form-label-sm">日期范围</label>
                            <div class="layui-input-inline ">
                                <input type="text" name="startDate" autocomplete="off" id="start-date" lay-verify="date"
                                       class="layui-input" placeholder="开始日期">
                            </div>
                            <div class="layui-form-mid">-</div>
                            <div class="layui-input-inline">
                                <input type="text" name="endDate" autocomplete="off" id="end-date" lay-verify="date"
                                       class="layui-input" placeholder="结束日期">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-label-sm">被奖励人</label>
                            <div class="layui-input-inline" style="width:190px;">
                                <input type="text" name="rewardUserName" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-label-sm">申请人</label>
                            <div class="layui-input-inline" style="width:190px;">
                                <select name="applyUserId" id="applyUserId" lay-search="" lay-filter="applyUserId">
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-label-sm">状态</label>
                            <div class="layui-input-inline" >
                                <select name="status" id="status" >
                                    <option value="4">待签发</option>
                                    <option value="6">已签发</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <div id="query" class="layui-btn">
                                <em class="layui-icon">&#xe615;</em> 查询
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div class="febs-table-full">
        <table lay-filter="incentiveRewardIssuanceTable" id="incentiveRewardIssuanceTable" lay-data="{id: 'incentiveRewardIssuanceTable'}"></table>
    </div>
</div>
<th:block th:include="include::foot" />
<script type="text/html" id="incentiveRewardIssuance-tool">
    <span shiro:lacksPermission="incentiveRewardIssuance:issuance,incentive:manager">
                <span class="layui-badge-dot febs-bg-orange"></span> 无权限
             </span>
    {{# if(d.status =='4'){  }}
    <a lay-event="issuance" shiro:hasPermission="incentiveRewardIssuance:issuance">
        <em class="layui-icon febs-edit-area febs-blue">&#xe7a4;</em></a>
    <a lay-event="del" shiro:hasPermission="incentive:manager">
        <em class="layui-icon febs-edit-area febs-red">&#xe7f9;</em></a>
    {{# }  }}
</script>
<script type="text/html" id="listStatusTransfer">
    {{# if(d.status=='1'){  }}
    <span class="layui-badge febs-tag-green">待提交</span>
    {{# }  }}
    {{# if(d.status=='2'){  }}
    <span class="layui-badge febs-tag-blue">待审核</span>
    {{# }  }}
    {{# if(d.status=='3'){  }}
    <span class="layui-badge febs-tag-orange">审核退回</span>
    {{# }  }}
    {{# if(d.status=='4'){  }}
    <span class="layui-badge febs-tag-magenta">待签发</span>
    {{# }  }}
    {{# if(d.status=='5'){  }}
    <span class="layui-badge febs-tag-gold">签发退回</span>
    {{# }  }}
    {{# if(d.status=='6'){  }}
    <span class="layui-badge febs-tag-cyan">已签发</span>
    {{# }  }}
</script>
<script data-th-inline="javascript" >
    hasHeadCompanyRole = [[${hasHeadCompanyRole}]];
    tenantList  = [[${tenantList }]];
</script>
<script th:src="@{/febs/js/incentive/incentiveRewardIssuance/incentiveRewardIssuanceList.js(v=1)}"></script>
</body>
</html>